package TankWar;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

public class ResourceManager {
    private BufferedImage tankImage;
    private BufferedImage bulletImage;
    private BufferedImage wallImage;
    private BufferedImage backgroundImage;

    public ResourceManager() {
        try {
            tankImage = ImageIO.read(getClass().getResource("/tank.png"));
            bulletImage = ImageIO.read(getClass().getResource("/bullet.png"));
            wallImage = ImageIO.read(getClass().getResource("/wall.png"));
            backgroundImage = ImageIO.read(getClass().getResource("/background.png"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public BufferedImage getTankImage() {
        return tankImage;
    }

    public BufferedImage getBulletImage() {
        return bulletImage;
    }

    public BufferedImage getWallImage() {
        return wallImage;
    }

    public BufferedImage getBackgroundImage() {
        return backgroundImage;
    }
}
